var db = require("mongoose");
db.Promise = require("bluebird");
db.connect("mongodb://localhost/mystudent",{
    useMongoClient:true
});

var Schema = db.Schema;

var student_schema = new Schema({
    name:String,
    photo:String,
    age:{
        type:Number,
        default:0
    },
    mobile:String,
    address:String,
    hobby:String,
    remark:String,
    gender:String,
    email:String,
    birthday:{
        type:Date,
        default:Date.now
    }
})

module.exports.Student = db.model("student",student_schema);

